/*
 * Speed_Speed_1_Transition.cpp
 *
 * Transition from Speed mode state to itself.
 * This transition's activity deals with changing the
 * calculation mode.
 *
 * Author: Zachary Masiello
 * Author: Peter-John Rowe
 */

#include "Speed_Speed_1_Transition.h"
#include "Cyclometer.h"

Speed_Speed_1_Transition::Speed_Speed_1_Transition(Cyclometer* cyclo,IState* defNextState,int id) {
	context = cyclo;
	nextState = defNextState;
	eventID = id;
}

Speed_Speed_1_Transition::~Speed_Speed_1_Transition() {
	// TODO Auto-generated destructor stub
}

IState* Speed_Speed_1_Transition::accept() {
	action();
	return nextState;
}

bool Speed_Speed_1_Transition::guard() {
	return true;
}

void Speed_Speed_1_Transition::action() {
	context->changeCalcMode();
}
